<?
include "../DBConnect.php";
include "../funcoes.php";

valida_sessao(1);

$StrSQL = " SELECT id_agenda_item FROM agenda_item ORDER BY id_agenda_item DESC LIMIT 1 ";
$ID = execute($StrSQL);

$i = mysql_num_rows($ID);
if($i > 0){
	while($linha = mysql_fetch_array($ID)){
		exit($linha['id_agenda_item']);
	}
}else{
	exit("1");
}
?>